home *** CD-ROM | disk | FTP | other *** search
- /*
- from engber@gumball.ils.nwu.edu (Mike Engber):
-
- Thanks for all the replys to my centering DLOG/ALRT question. I used the
- best ideas to synthesize my solution which I think elegant enough to be
- worth sharing. Attached are the relevant portions of my .h & .c files.
-
- A couple of notes:
-
- Several people`s solutions burned in the rsrc ids of the standard
- file dialogs. You may want to note that there are named constants for
- these values: putDlgID & getDlgID.
-
- All the solutions I was sent used screenBits.bounds. Is this what you
- want in a multi-monitor situation? If not, what should you do?
-
- Feel free to use/modify/comment-on this code, especially if you notice
- any bugs or questionable practices.
-
- -ME
- */
-
- /* DialogUtils.h */
-
- /* Return topLeft point to center standard file dialogs. */
- extern Point DU_StdPutWhere(void);
- extern Point DU_StdGetWhere(void);
-
- /*
- * Pre-load and center ALRT/DLOG template resources. Changes do not affect
- * the resource file, but if the ALRT/DLOG is created soon after the call
- * it will use the modified (centered) template in memory. Both routines
- * return the passed rsrc id to allow calls like:
- * Alert(DU_CenterALRT(alertID),filter);
- * GetNewDialog(DU_CenterDLOG(dlogID),dStorage,behindWindow);
- */
- extern short DU_CenterALRT(short rsrcId);
- extern short DU_CenterDLOG(short rsrcId);
-
-